package com.homeworkp8.Worker2Test;

public class Test {
    public static void main(String[] args) {
        //5.设计父类一员工类。子类：工人类，农民类，教师类，科学家类，服务生类
        //（1）其中工人，农民，服务生只有基本工资
        //（2）科学家除基本工资外有年终奖
        //（3）教师除基本工资外有课酬（元/天）
        //（4）编写一个测试类，将各种类型的员工的全年工资打印出来
        //工人，农民，服务生测试
        Farmer farmer = new Farmer("moose",100,365);
        farmer.printSalary();

        //科学家，教师测试
        Scientist scientist = new Scientist("Bruce",1000,365);
        scientist.setBonus(500000);
        scientist.printSalary();

        Teacher teacher = new Teacher("Lee",100,365);
        teacher.setDailybonues(1000);
        teacher.setDate(15);
        teacher.printSalary();

    }
}
